#pragma once

#include "CollisionInfo.h"

#include "../SGD Wrappers/CSGD_Direct3D.h"
#include <string>

class CollisionTile // Will inherit from Object
{
protected:
	class Object;

private:

	struct CollisionEvent
	{
		std::string message;
		std::string value;
	};

	D3DRECT bounds;
	CollisionEvent collisionEvent;

public:
	// Constructor
	CollisionTile(void);
	CollisionTile(int posX, int posY, int width, int height);

	// Destructor
	~CollisionTile(void);

	//////////////////////////////////////////////////
	// Methods:
	void Update(float deltaTime);
	void Render(void) const;
	void HandleCollision(CollisionInfo info);

	//////////////////////////////////////////////////
	// Accessors:
	int PosX(void) const { return bounds.x1; }
	int PosY(void) const { return bounds.y1; }
	int Width(void) const { return bounds.x1 - bounds.x2; }
	int Height(void) const { return bounds.y1 - bounds.y2; }

	//////////////////////////////////////////////////
	// Mutators:
	void SetPosX(unsigned int x);
	void SetPosY(unsigned int y);
	void SetWidth(unsigned int width);
	void SetHeight(unsigned int height);
	void SetEventMessage(const char* message);
	void SetEventMessage(std::string message);
	void SetEventValue(std::string value);
};

